<template>
  <div class="order-checked-main">
    <div class="header-main">
      <span class="left-icon" @click="goBack"><van-icon name="arrow-left" /></span>
      <div class="center">{{ $t('h.A057') }}</div>
      <span class="icon-right" @click="$router.push('/rechargeRecode')">{{ $t('h.A058') }}</span>
    </div>
    <div class="recharge">
      <img class="bgk-top" src="../../assets/image/beijing.c1f99890.png" alt="">
      <div class="recharge-box">
        {{$t('h.A059') }}
      </div>
      <div class="recharge-list">
        <van-cell-group :border="false">
          <van-cell v-for="(item,index) in  list" :key="index" @click="goNext(item.data)" :border="false" style="margin-bottom: 20px" is-link>
            <template slot="title">
              <div class="image">
                <img :src="item.icon" alt="">
                <span>{{ item.name }}</span>
              </div>
            </template>
          </van-cell>
        </van-cell-group>
      </div>
    </div>
</div>
</template>

<script>
import {getRechargeList} from "@/api/apiFox";

export default {
  name: "index",
  data(){
    return{
      list:[]
    }
  },
  methods: {
    goNext(url){
      window.location = url
    },
    goBack() {
      this.$router.go(-1)
    },


    getRecharge(){
      getRechargeList().then(res=>{
        this.list = res
      })
    }
  },
  mounted() {
    this.getRecharge()
  }
}
</script>

<style scoped lang="scss">
.order-checked-main {
  width: 100%;
  background: #ffffff;
  min-height: 100vh;

  .header-main {
    width: 100%;
    height: 45px;
    padding: 15px 0 0 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #fff;

    .left-icon {
      position: absolute;
      left: 20px;
    }

    .center {
      width: 100%;
      height: 45px;
      text-align: center;
      line-height: 45px;
      font-size: 15px;
    }

    .icon-right {
      position: absolute;
      right: 20px !important;
      font-size: 12px;
      color: #aaaaaa;
    }
  }
  .recharge{
    width: 100%;
    padding: 3%;
    box-sizing: border-box;
    .bgk-top{
      width: 100%;
    }
    .recharge-box{
      width: 100%;
      height: 60px;
      background: #f6f6f6;
      border-radius: 5px;
      font-size: 14px;
      color: #999;
      margin-top: 20px;
      padding: 3%;
      box-sizing: border-box;
    }
    .recharge-list{
      width: 100%;
      margin-top: 20px;
    }
  }
  .image{
    display: flex;
    align-items: center;
    img{
      height: 25px;
    }
    span{
      margin-left: 10px;
      font-size: 15px;
    }
  }
}
</style>
